package com.wxb.pm.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.wxb.pm.Model.domain.User;
import com.wxb.pm.Model.vo.UserVO;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

import static com.wxb.pm.constant.UserConstant.ADMIN_ROLE;
import static com.wxb.pm.constant.UserConstant.USER_LOGIN_STATE;

/**
* @author 12796
* @description 针对表【user(用户)】的数据库操作Service
* @createDate 2023-07-17 10:28:03
*/
public interface UserService extends IService<User> {

    long userRegister(String userAccount,String userPassword,String checkPassword);

    User userLogin(String userAccount, String userPassword, HttpServletRequest request);

    User getSafetyUser(User originUser);

    int userLogout(HttpServletRequest request);

    List<User> searchUsersByTags(List<String> tagNameList);

    User getLoginUser(HttpServletRequest request);
    int updateUser(User updateUser,User loginUser);


    boolean isAdmin(HttpServletRequest request);

    boolean isAdmin(User loginuser);

    /**
     * 未完善
     * @param num
     * @param loginUser
     * @return
     */
    List<User> matchUsers(long num, User loginUser);
}
